<?php

$xml = $_POST;

$document = xmldoc($xml);

$rootElement = $document->root();

$childNodes = $rootElement->children();




$sxml = simplexml_load_string($xml);


 $fd = fopen("text.txt","w");
  fwrite($fd, $xml);
   //fwrite($fd, $sxml->name);
   // fwrite($fd, $sxml->text->name);
  fclose($fd);

//$document = xmldlc($xml);